#include "matrixfunctions.h"

int kdiv(int x[][100], int rows, int col, int k)
{
	int nr=0;
	int i, j;
	for (i=0;i<rows;i++)
		for(j=0;j<col;j++)
			if(x[i][j]%k==0)
			++nr;
return nr;

}

int main()
{
	int row, col, k, nr;
	int mat[100][100];
	cout<<"Number of rows : " ;
	cin>>row;
	cout<<"Number of columns : " ;
	cin>>col;
	readmatrix(mat, row, col);
	cout<<"Number K : ";	
	cin>>k;
	nr= kdiv(mat, row, col, k);
	cout<<nr<<"\n";


return 0;
}
